powered by
Probability mass function and cumulative distribution function of the Bernoulli distribution.
dbern(y, prob) pbern(y, prob)
a vector of zeros and ones.
probability.
dbern returns the probability mass function, pbern returns the cumulative distribution function.
dbern
pbern
The code relies on the functions dbinom and pbinom with size=1 and log=FALSE.
dbinom
pbinom
size=1
log=FALSE
See the documentation for dbinom and pbinom for more details.
# NOT RUN { dbern(c(0,1),0.4) pbern(c(0,1),0.4) # }
Run the code above in your browser using DataLab